package wzs.arithmetics;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

//题目：求s=a+aa+aaa+aaaa+aa...a的值，其中a是一个数字。
//例如2+22   几个数相加有键盘控制。   
/*
2
22
24*/


public class Test_wzs8
{
	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tmp = br.readLine();
		int temp = Integer.valueOf(tmp);
		
		int newNumber = 0;
		int total = 0;
		for (int i = 0; i < temp; i++)
		{
			newNumber = newNumber * 10 + temp;
			System.out.println(newNumber);
			total = total + newNumber;
		}
		System.out.println(total);
	}
}
